Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-home SDK implementations #50

Closed
wants to merge 21 commits into from
Closed

Re-home SDK implementations #50

wants to merge 21 commits into from

Conversation

coreyti
Copy link
Member

@coreyti coreyti commented May 20, 2024

I would like to make it clearer which code represents the integration with the Playwright Server, vs. which is the "API", for use by the consumer. As such, the former will be re-homed into Playwright.SDK.

@coreyti coreyti force-pushed the 202405-rehome--sdk branch from 4cb79ef to 880ce10 Compare May 20, 2024 17:37
coreyti added 21 commits May 25, 2024 12:00
Rehomed `Playwright.ChannelOwner` into `Playwright.SDK`.
Rehomed `Playwright.Channel` into `Playwright.SDK`.
Rehomed `Playwright.CLI` into `Playwright.SDK`.
Rehomed `Playwright.Config` into `Playwright.SDK`.
Rehomed `Playwright.Transport` into `Playwright.SDK`.
Rehomed `Playwright.Channel.*` into `Playwright.SDK`.
Rehomed `Playwright.Extra.*` into `Playwright.SDK`.
Rehomed `Playwright.Helpers.*` into `Playwright.SDK`.
Rehomed `test/unit` as `test/sdk`.
- Switch to pinning to specific versions of playwright and electron node
  packages. We should be matching.
- Simplify the asset packaging approach. Starting at v1.38 of Playwright
  (proper), using `esbuild` got much harder, and the benefits seem less
  evident. So, we're now doing a basic `cp` of what's needed.
- Bump playwright_assets to latest, in preparation for what's to come.
- Switch to `driver.js`, replacing `playwright_cli.js`; it feels nicer and
  matches the Elixir module naming.
This change is primarily to prove out the rest of what was needed in order to
make this version bump to playwright.js; a follow-on will bump up to the
latest.
It turns out the module fails to load if saved as a script.
These changes bring playwright-elixir's integration with playwright server up
to date with playwright-core v1.38.0, which appears to have had a number of
breaking changes (for our SDK). Of note:

- Update WebSocket transport to send browser type as a header, per
  recent Playwright Server API changes.
- Implement `Playwright.connect`, for WebSocket transport sessions.
- Update `ws://...` endpoint to match Playwright Server changes
- Clarify options for `Playwright.connect` vs. `Playwright.launch`
- Add debug handling of a potential serialization bug. Note that this
  may have occurred as a side effect of other Playwright Server
  integration issues that have been fixed.
Yet again, this upgrade changes how the Playwright CLI/program is execute. So,
this change also includes a more static defintion of `driver.js`; one that will
probably need to be reworked periodically.
Some of which stem from internal changes, some from changes to playwright-core.
According to Playwright.dev, accessibility testing should be executed with
separate, spacialized libraries. The Playwright implementation is deprecated.

This change also removes a failing test, in keeping with the matching removal
from Playwright proper. It appears that the browser behavior was considered to
be too inconsistent.
@coreyti coreyti force-pushed the 202405-rehome--sdk branch from 4cdd14b to e758c7b Compare May 25, 2024 19:07
@coreyti
Copy link
Member Author

coreyti commented May 31, 2024

This work has been merged via non-PR workflow.

@coreyti coreyti closed this May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant